<?xml version="1.0" encoding="utf-8"?>

<!--
Sample license text.
-->

<xs:schema xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:lcm="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns="urn:ihe:iti:xds-b:2007" xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn:ihe:iti:xds-b:2007" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import schemaLocation="../ebRS/rs.xsd" namespace="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" />
  <xs:import schemaLocation="../ebRS/rim.xsd" namespace="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" />
  <xs:import schemaLocation="../ebRS/lcm.xsd" namespace="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" />
  <xs:import schemaLocation="../ebRS/query.xsd" namespace="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" />
  <xs:complexType name="RetrieveDocumentSetRequestType">
    <xs:sequence>
      <xs:element maxOccurs="unbounded" name="DocumentRequest">
        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" name="HomeCommunityId" type="rim:LongName">
              <xs:annotation>
                <xs:documentation>This corresponds to the home attribute of the Identifiable class in regrep RIM (regrep-rim-3.0-os.pdf, page 20)</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="RepositoryUniqueId" type="rim:LongName">
              <xs:annotation>
                <xs:documentation>This is the XDSDocumentEntry.repositoryUniqueId attribute in the XDS metadata</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="DocumentUniqueId" type="rim:LongName">
              <xs:annotation>
                <xs:documentation>This is the XDSDocumentEntry.uniqueId attribute in the XDS metadata</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="RetrieveDocumentSetResponseType">
    <xs:sequence>
      <xs:element ref="rs:RegistryResponse" />
      <xs:sequence minOccurs="0">
        <xs:element maxOccurs="unbounded" name="DocumentResponse">
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="0" name="HomeCommunityId" type="rim:LongName">
                <xs:annotation>
                  <xs:documentation>This corresponds to the home attribute of the Identifiable class in regrep RIM (regrep-rim-3.0-os.pdf, page 20)</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element name="RepositoryUniqueId" type="rim:LongName">
                <xs:annotation>
                  <xs:documentation>This is the XDSDocumentEntry.repositoryUniqueId attribute in the XDS metadata</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element name="DocumentUniqueId" type="rim:LongName">
                <xs:annotation>
                  <xs:documentation>This is the XDSDocumentEntry.uniqueId attribute in the XDS metadata</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element minOccurs="0" name="NewRepositoryUniqueId" type="rim:LongName">
                <xs:annotation>
                  <xs:documentation>This identifies the Document Repository that will support retrieval of the document created as a result of retrieval of the On-Demand Document.  This is required when the On-Demand Document Source supports the Persistence of Retrieved Documents Option.</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element minOccurs="0" name="NewDocumentUniqueId" type="rim:LongName">
                <xs:annotation>
                  <xs:documentation>This identifies the document returned in the response when retrieval is of an On-Demand Document.  This is required when retrieval is of an On-Demand Document.</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element name="mimeType" type="rim:LongName" />
              <xs:element name="Document" type="xs:base64Binary" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="RetrieveDocumentSetRequest" type="RetrieveDocumentSetRequestType" />
  <xs:element name="RetrieveDocumentSetResponse" type="RetrieveDocumentSetResponseType" />
  <xs:complexType name="ProvideAndRegisterDocumentSetRequestType">
    <xs:sequence>
      <xs:element ref="lcm:SubmitObjectsRequest" />
      <xs:sequence minOccurs="0">
        <xs:element maxOccurs="unbounded" name="Document">
          <xs:complexType>
            <xs:simpleContent>
              <xs:extension base="xs:base64Binary">
                <xs:attribute name="id" type="xs:anyURI" use="required">
                  <xs:annotation>
                    <xs:documentation>This corresponds to the ExtrinsicObject id in the eb RIM metadata a provides a linkage between the actual document data and its metadata</xs:documentation>
                  </xs:annotation>
                </xs:attribute>
              </xs:extension>
            </xs:simpleContent>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ProvideAndRegisterDocumentSetRequest" type="ProvideAndRegisterDocumentSetRequestType" />
</xs:schema>